<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <buttoncount></buttoncount>
    </div>
    <script src="../vue.js"></script>
    <script>
        Vue.component('buttoncount', {
            data() {
                return {
                    count: 0
                }
            },
            template: "<button @click='handle'>点击了{{count}}下</button>",
            methods: {
                handle() {
                    this.count += 2
                }
            }
        })
        const vm = new Vue({
            el: "#app",
            data: {

            }
        })
    </script>
</body>

</html>